package com.itao.security.expression;

import org.springframework.security.access.expression.SecurityExpressionRoot;
import org.springframework.security.core.Authentication;

public class OpcnetSecurityExpressionRoot extends SecurityExpressionRoot implements
        OpcnetSecurityExpressionOperations {

    public OpcnetSecurityExpressionRoot(Authentication a) {
        super(a);
    }

    public boolean hasAnyPermission(Object... targets) {
        for (Object target : targets) {
            if (super.hasPermission(target, read)) {
                return true;
            }
        }
        return false;
    }

    public boolean hasPermission(Object target) {
        return super.hasPermission(target, read);
    }

}
